package com.lzh.oop.bean;

import java.util.ArrayList;
import java.util.List;

public class ShapeManager {
    List<IShape> shapes = new ArrayList<>();
    public void addShape(IShape shape){
        shapes.add(shape);
    }

    public void delShape(IShape rect) {
        shapes.remove(rect);
    }

    public void drawShapes() {
        for (IShape shape : shapes) {
            shape.draw();
        }
    }
}
